Closed Thread Icon

Preserved Topic: Search engine friendly popup links (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=8218" title="Pages that link to Preserved Topic: Search engine friendly popup links (Page 1 of 1)" rel="nofollow" >Preserved Topic: Search engine friendly popup links <span class="small">(Page 1 of 1)</span>\

 
Emperor
Maniac (V) Mad Scientist with Finglongers

From: Cell 53, East Wing
Insane since: Jul 2001

posted posted 06-25-2002 02:45

I've been playing with making popup windows more search engine friendly and this seems like a nice and neat solution:

code:
<a href="new_window.php" target="_blank"
onclick="windowPop(this.href,
this.target,'top=0,left=0,toolbar=no,location=no,status=yes, menubar=no,scrollbars=no,resizable=yes,width=200,height=350');
return false;">Open window</a>



but it only works once and after that it will just open a normal target=_blank window unless you refresh the page (due I presume to the return false). Is there a better solution to this or am I overlooking a neat little fix (that one of our DHTML gurus will produce from his hat)?

I was also looking at yp's site and noticed his popups were also indexable by search engines, e.g.:
http://www.youngpup.net/?request=/components/ypXmlTree.xml&xpath=/project/samples

but I'm still trying to work out his code (very clever though - at least as far as I'm concerned).

[edit: HSBoD]

___________________
Emps

FAQs: Emperor

bitdamaged
Maniac (V) Mad Scientist

From: 100101010011 <-- right about here
Insane since: Mar 2000

posted posted 06-25-2002 03:38

ummm

works fine for me.
but I don't know why you are passing the target attrib as the name.





.:[ Never resist a perfect moment ]:.

Emperor
Maniac (V) Mad Scientist with Finglongers

From: Cell 53, East Wing
Insane since: Jul 2001

posted posted 06-25-2002 03:53

bitdamaged: Thanks for checking - it might be something else I'm doing then (back to fiddling).

The this.target bit? Well it was how it was done in a number of different examples (yp does it as well doesn't he?) and everything worked well so I left it in (I'll have a play with changing that and see if that fixes it).

___________________
Emps

FAQs: Emperor

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 06-25-2002 15:15

Using this.target as that attribute is the correct thing to do. The value passed into that attribute is the name of the window that the page should open in. This is analagous to target="" in the <a> tag, which specifies the name of the window that the link should open in.

So if two <a> tags have the same target, they'll open in the same window.

I'm not entirely sure why that only works on the first click. May we see a working (or *not* working as the case may be) example?

Show Forum Drop Down Menu